<?php
// 测试成功
$userid = $_POST['userid'];
//echo $userid;
$db = new PDO('mysql:host=localhost;dbname=xdq','root','123456');
$statement=$db->prepare('select * from student where openid= :userid');
$statement->execute(array(':userid'=>$userid));
$user=$statement->fetch();
if(empty($user)){
    echo "false";
}else{
    echo "true";
}
?>  